package subnarines;

import javax.swing.*;

public class BattleShip extends SeaObject {
    int life;
    int payload = 20;

    public BattleShip(){
        super(66,26,270,124,30);
        life = 3;
    }

    @Override
    public void move() {

    }

    public void moveLeft(){x -= speed;}

    public void moveRight(){x += speed;}

    public Bomb shootBomb(){
        payload--;
        return new Bomb(this.x,this.y);
    }

    public int getLife(){
        return life;
    }

    public void addLife(int num) {
        life += num;
    }
    public void subtractLife(){
        life--;
    }

    public int subtractScore(){
        return 30;
    }

    public ImageIcon getImage(){
        return Images.battleship;
    }
}

